<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			
			// 延迟检查用户登录状态，确保所有模块都已加载
			setTimeout(() => {
				try {
					// 检查用户登录状态，如果已登录则启动聊天功能
					const token = uni.getStorageSync('token');
					const userInfo = uni.getStorageSync('userInfo');
					if (token && userInfo && this.$chat) {
						console.log('用户已登录，启动聊天功能');
						this.$chat.startChat().catch(error => {
							console.error('启动聊天功能失败:', error);
						});
					}
				} catch (error) {
					console.error('检查登录状态时出错:', error);
				}
			}, 1000);
			
			// uni.onPushMessage((res) => {
			// 	console.log("收到推送消息：", res) //监听推送消息
			// })
		},
		onShow: function() {
			console.log('App Show')
			
			// 触发应用显示事件
			uni.$emit('app-show');
			
			// #ifdef MP-WEIXIN
			//判断版本
			// const updateManager = uni.getUpdateManager();
			// updateManager.onCheckForUpdate(function(res) {
			// 	// console.log('请求完新版本信息的回调', res.hasUpdate)
			// });
			// updateManager.onUpdateReady(function() {
			// 	uni.showModal({
			// 		title: '更新提示',
			// 		content: '新版本已经准备好，是否重启应用？',
			// 		success(res) {
			// 			if (res.confirm) {
			// 				// 新的版本已经下载好，调用 applyUpdate 应用新版本并重启
			// 				updateManager.applyUpdate();
			// 			}
			// 		}
			// 	});
			// });
			// updateManager.onUpdateFailed(function() {
			// 	// 新版本下载失败
			// });
			// #endif
		},
		onHide: function() {
			console.log('App Hide')
			
			// 触发应用隐藏事件
			uni.$emit('app-hide');
		}
	}
</script>

<style lang="scss">
	/* 引入三方动效库 */
	@import "/node_modules/animate.css/animate.css";



	@font-face {
		font-family: "iconfont";
		/* Project id 4794552 */
		src: url('https://at.alicdn.com/t/c/font_4794552_568aesqpyfw.woff2?t=1744688207890') format('woff2'),
			url('https://at.alicdn.com/t/c/font_4794552_568aesqpyfw.woff?t=1744688207890') format('woff'),
			url('https://at.alicdn.com/t/c/font_4794552_568aesqpyfw.ttf?t=1744688207890') format('truetype');
	}

	.iconfont {
		font-family: "iconfont" !important;
		font-size: 16px;
		font-style: normal;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
	}

	.ic-a-074_liwu:before {
		content: "\e79c";
	}


	.ic-yiwancheng2:before {
		content: "\e60b";
	}

	.ic-yiwancheng:before {
		content: "\e6a1";
	}

	.ic-shangjia:before {
		content: "\fad7";
	}

	.ic-kefuguanli:before {
		content: "\fbd3";
	}

	.ic-pingjia:before {
		content: "\fae3";
	}

	.ic-daifukuan:before {
		content: "\faf4";
	}

	.ic-daifahuo:before {
		content: "\faf7";
	}

	.ic-daishouhuo:before {
		content: "\faf8";
	}

	.ic-huochepiao1:before {
		content: "\fc05";
	}


	.ic-shoucang:before {
		content: "\f8a4";
	}

	.ic-gou:before {
		content: "\e612";
	}

	.ic-gou1:before {
		content: "\e61e";
	}

	.ic-gou2:before {
		content: "\ee36";
	}

	.ic-shanchu1:before {
		content: "\e62b";
	}

	.ic-shanchu2:before {
		content: "\e731";
	}

	.ic-shanchu3:before {
		content: "\e630";
	}

	.ic-a-gouwucheman-mianxing:before {
		content: "\e662";
	}

	.ic-gouwuche_mian24:before {
		content: "\e60f";
	}

	.ic-delete-gray:before {
		content: "\e605";
	}

	.ic-dizhi:before {
		content: "\e60a";
	}

	.ic-gouwuche1:before {
		content: "\e655";
	}

	.ic-favorite-line:before {
		content: "\e632";
	}

	.ic-favorite-s:before {
		content: "\e633";
	}

	.ic-aixin:before {
		content: "\e8ab";
	}

	.ic-aixin1:before {
		content: "\e8c3";
	}

	.ic-gou-shi:before {
		content: "\e658";
	}

	.ic-gou-kong:before {
		content: "\e659";
	}


	.ic-gouwuche:before {
		content: "\e67e";
	}

	.ic-xiexian1:before {
		content: "\eca5";
	}


	.ic-yijiesuan:before {
		content: "\e646";
	}

	.ic-a-jianqudingceng6:before {
		content: "\e753";
	}


	.ic-nv:before {
		content: "\e6d9";
	}

	.ic-nan:before {
		content: "\e6dc";
	}

	.ic-wenhao-xianxingyuankuang:before {
		content: "\e8e9";
	}

	.ic-record-actice:before {
		content: "\e672";
	}

	.ic-quntixiaofei_xiaofeizonge:before {
		content: "\e645";
	}

	.ic-chongzhi:before {
		content: "\1017b";
	}

	.ic-qianbao2-F:before {
		content: "\e62e";
	}

	.ic-changjianwenti2:before {
		content: "\e6fd";
	}

	.ic-changjianwenti1:before {
		content: "\e75b";
	}

	.ic-question:before {
		content: "\e65c";
	}

	.ic-changjianwenti-01:before {
		content: "\e605";
	}

	.ic-changjianwenti:before {
		content: "\e636";
	}

	.ic-mima:before {
		content: "\e606";
	}

	.ic-user:before {
		content: "\e617";
	}

	.ic-yonghuming:before {
		content: "\e6c9";
	}

	.ic-liebiaoxingshi:before {
		content: "\e742";
	}

	.ic-pubuliuhengxiang:before {
		content: "\e69d";
	}

	.ic-shaixuan1:before {
		content: "\e695";
	}

	.ic-arrow_right_fat:before {
		content: "\e62c";
	}

	.ic-hengxian1:before {
		content: "\e604";
	}

	.ic-you:before {
		content: "\e63f";
	}

	.ic-zuo:before {
		content: "\e640";
	}

	.ic-xia:before {
		content: "\e641";
	}

	.ic-shang:before {
		content: "\e643";
	}

	.ic-dian:before {
		content: "\e607";
	}

	.ic-kefu1:before {
		content: "\e687";
	}

	.ic-dianhua:before {
		content: "\e66e";
	}

	.ic-tupian01-F:before {
		content: "\e63c";
	}

	.ic-h:before {
		content: "\e970";
	}

	.ic-weixiaobiaoqing:before {
		content: "\e642";
	}

	.ic-shanchu2-fang-F:before {
		content: "\e611";
	}

	.ic-baocun-F:before {
		content: "\e616";
	}

	.ic-bofang-fang-F:before {
		content: "\e63d";
	}

	.ic-lianjie-fang-F:before {
		content: "\e63e";
	}

	.ic-qianjin:before {
		content: "\e600";
	}

	.ic-daoru:before {
		content: "\e60e";
	}

	.ic-secaibiaoge:before {
		content: "\e60d";
	}

	.ic-mobanzhongxin-copy:before {
		content: "\ed85";
	}

	.ic-biaotilan:before {
		content: "\e6ad";
	}

	.ic-daima1:before {
		content: "\e68d";
	}

	.ic-shanchu:before {
		content: "\e62d";
	}

	.ic-yinyongfang:before {
		content: "\eb80";
	}

	.ic-jia1:before {
		content: "\e711";
	}

	.ic-zuji:before {
		content: "\e609";
	}

	.ic-gerenxinxi:before {
		content: "\e61d";
	}

	.ic-renzhengyirenzheng:before {
		content: "\e644";
	}

	.ic-guanbituichu:before {
		content: "\e613";
	}

	.ic-share-s:before {
		content: "\e637";
	}

	.ic-share-line:before {
		content: "\e638";
	}

	.ic-sousuo1:before {
		content: "\e61c";
	}

	.ic-gerenxinxibianji:before {
		content: "\e62f";
	}

	.ic-quill-pen-fill:before {
		content: "\e76d";
	}

	.ic-nice:before {
		content: "\e639";
	}

	.ic-nice-line:before {
		content: "\e63a";
	}

	.ic-jia:before {
		content: "\e627";
	}

	.ic-talk-line:before {
		content: "\e650";
	}

	.ic-talk-s:before {
		content: "\e651";
	}

	.ic-jinru:before {
		content: "\e621";
	}

	.ic-fanhui:before {
		content: "\e6a0";
	}

	.ic-shouye:before {
		content: "\e602";
	}

	.ic-fenxiang:before {
		content: "\e603";
	}

	.ic-fenxiang1:before {
		content: "\e691";
	}

	.ic-qunliao:before {
		content: "\e654";
	}

	.ic-a-wenkuwenzhang:before {
		content: "\e6af";
	}

	.ic-baoming:before {
		content: "\e6a2";
	}

	.ic-luxian:before {
		content: "\e601";
	}

	.ic-shijianxuanzeqi:before {
		content: "\e750";
	}

	.ic-weizhi:before {
		content: "\e670";
	}

	.ic-qingchu:before {
		content: "\e608";
	}

	.ic-sousuo:before {
		content: "\e6ac";
	}

	.ic-guanbi:before {
		content: "\e7e8";
	}

	.ic-tupian:before {
		content: "\e63c";
	}





















	page {
		height: 100%;
	}

	view,
	swiper-item,
	scroll-view,
	text,
	input,
	button,
	cover-image,
	cover-view,
	image,
	form,
	label,
	progress,
	switch,
	textarea,
	rich-text,
	audio,
	video {
		box-sizing: border-box;
	}


	button::after {
		border: none;
	}


	.w-100 {
		width: 100%;
	}

	.w-90 {
		width: 90%;
	}

	.w-85 {
		width: 85%;
	}

	.w-80 {
		width: 80%;
	}

	.w-70 {
		width: 70%;
	}

	.w-60 {
		width: 60%;
	}

	.w-50 {
		width: 50%;
	}

	.w-48 {
		width: 48%;
	}

	.w-46 {
		width: 46%;
	}

	.w-25 {
		width: 25%;
	}

	.w-10 {
		width: 10%;
	}

	.min-h-100 {
		min-height: 100vh;
	}

	.h-310 {
		height: 310rpx;
	}

	.h-100-vh {
		height: 100vh;
	}

	.h-70-vh {
		height: 70vh;
	}

	.h-60-vh {
		height: 60vh;
	}

	.h-50-vh {
		height: 50vh;
	}

	.h-40-vh {
		height: 40vh;
	}


	.h-100 {
		height: 100%;
	}


	.h-100-r {
		height: 100rpx;
	}

	.h-90 {
		height: 90rpx;
	}

	.lh-100 {
		line-height: 100rpx;
	}

	.lh-90 {
		line-height: 90rpx;
	}

	.lh-70 {
		line-height: 70rpx;
	}

	.lh-50 {
		line-height: 50rpx;
	}

	.lh-40 {
		line-height: 40rpx;
	}

	.lh-30 {
		line-height: 30rpx;
	}

	.lh-20 {
		line-height: 20rpx;
	}

	.text-ali-c {
		text-align: center;
	}

	.text-ali-r {
		text-align: right;
	}

	/* 阴影 */
	.box-s-888 {
		box-shadow: 0rpx 8rpx 20rpx #b5b5b5;
	}

	/* 文字超过4行 */
	.text-element-4 {
		display: -webkit-box !important;
		-webkit-box-orient: vertical;
		overflow: hidden;
		-webkit-line-clamp: 4;
		/* 控制显示的行数 */
	}

	/* 文字超过2行 */
	.text-element-2 {
		display: -webkit-box !important;
		-webkit-box-orient: vertical;
		overflow: hidden;
		-webkit-line-clamp: 2;
		/* 控制显示的行数 */
	}

	/* 文字超过1行 */
	.text-element-1 {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		overflow: hidden;
		-webkit-line-clamp: 1;
		/* 控制显示的行数 */
	}

	.flex-1 {
		display: flex;
		flex: 1;
	}

	/* 垂直排列 */
	.flex-dir-col {
		display: flex;
		flex-direction: column;
	}

	/* 居中 */
	.ali-item-cen {
		display: flex;
		align-items: center;
	}


	.ali-item-sta {
		display: flex;
		align-items: flex-start;
	}

	.ali-item-rig {
		display: flex;
		align-items: flex-end;
	}

	.ali-item-bas {
		display: flex;
		align-items: baseline;
	}

	/* 水平排列，不换行 */
	.flex-dir-row {
		display: flex;
		flex-direction: row;
	}

	.pos-rela {
		position: relative;
	}

	.pos-fixed {
		position: fixed;
	}

	.pos-abso {
		position: absolute;
	}

	/* 强制换行 */
	.flex-w-wrap {
		flex-wrap: wrap;
	}

	/* 右侧对齐 */
	.flex-r-end {
		display: flex;
		justify-content: flex-end;
	}

	/* 平均分布 */
	.flex-x-bet {
		display: flex;
		justify-content: space-between;
	}

	/* 平均分布2 */
	.flex-x-spa {
		display: flex;
		justify-content: space-around;
	}

	.flex-center {
		display: flex;
		justify-content: center;
	}

	.f-wrap {
		flex-wrap: wrap;
	}


	.ml-50 {
		margin-left: 50rpx;
	}

	.ml-30 {
		margin-left: 30rpx;
	}

	.ml-20 {
		margin-left: 20rpx;
	}

	.ml-15 {
		margin-left: 15rpx;
	}

	.ml-10 {
		margin-left: 10rpx;
	}

	.ml-5 {
		margin-left: 5rpx;
	}

	.mb-50 {
		margin-bottom: 50rpx;
	}

	.mb-40 {
		margin-bottom: 40rpx;
	}

	.mb-30 {
		margin-bottom: 30rpx;
	}

	.mb-20 {
		margin-bottom: 20rpx;
	}

	.mb-15 {
		margin-bottom: 15rpx;
	}

	.mb-10 {
		margin-bottom: 10rpx;
	}

	.mb-5 {
		margin-bottom: 5rpx;
	}

	.mt-106 {
		margin-top: 106rpx;
	}

	.mt-80 {
		margin-top: 80rpx;
	}

	.mt-70 {
		margin-top: 70rpx;
	}

	.mt-60 {
		margin-top: 60rpx;
	}

	.mt-50 {
		margin-top: 50rpx;
	}

	.mt-40 {
		margin-top: 40rpx;
	}

	.mt-30 {
		margin-top: 30rpx !important;
	}

	.mt-20 {
		margin-top: 20rpx;
	}

	.mt-10 {
		margin-top: 10rpx;
	}

	.mt-5 {
		margin-top: 5rpx;
	}

	.mr-50 {
		margin-right: 50rpx;
	}

	.mr-40 {
		margin-right: 40rpx;
	}

	.mr-30 {
		margin-right: 30rpx;
	}

	.mr-20 {
		margin-right: 20rpx;
	}

	.mr-10 {
		margin-right: 10rpx;
	}

	.mr-5 {
		margin-right: 5rpx;
	}

	.ma {
		margin: auto;
	}

	.pr-10 {
		padding-right: 10rpx;
	}

	.pr-20 {
		padding-right: 20rpx;
	}

	.pt-60 {
		padding-top: 60rpx !important;
	}

	.pt-50 {
		padding-top: 50rpx !important;
	}

	.pt-40 {
		padding-top: 40rpx !important;
	}

	.pb-100 {
		padding-bottom: 100rpx !important;
	}

	.pb-30 {
		padding-bottom: 30rpx !important;
	}

	.pb-20 {
		padding-bottom: 20rpx !important;
	}

	.pb-10 {
		padding-bottom: 10rpx !important;
	}

	.pb-0 {
		padding-bottom: 0rpx !important;
	}

	.pt-30 {
		padding-top: 30rpx !important;
	}

	.pt-20 {
		padding-top: 20rpx !important;
	}

	.pt-10 {
		padding-top: 10rpx !important;
	}

	.pt-0 {
		padding-top: 0rpx !important;
	}

	.ping-40 {
		padding: 40rpx;
	}

	.ping-30 {
		padding: 30rpx;
	}

	.ping-10-20 {
		padding: 10rpx 20rpx;
	}

	.ping-13-25 {
		padding: 13rpx 25rpx;
	}

	.ping-20 {
		padding: 20rpx;
	}

	.ping-15 {
		padding: 15rpx;
	}

	.ping-10 {
		padding: 10rpx;
	}

	.ping-15-80 {
		padding: 15rpx 80rpx;
	}

	.ping-30-0 {
		padding: 30rpx 0rpx;
	}

	.ping-20-0 {
		padding: 20rpx 0rpx;
	}

	.ping-0-35 {
		padding: 0rpx 35rpx;
	}

	.ping-0-30 {
		padding: 0rpx 30rpx;
	}


	.ping-0-20 {
		padding: 0rpx 20rpx;
	}

	.ping-0-10 {
		padding: 0rpx 10rpx;
	}

	.ping-6-10 {
		padding: 4rpx 10rpx;
	}

	.ping-5-15 {
		padding: 8rpx 15rpx;
	}

	.brtl-20 {
		border-top-left-radius: 20rpx;
	}

	.brbl-20 {
		border-bottom-left-radius: 20rpx;
	}

	.brtr-20 {
		border-top-right-radius: 20rpx;
	}

	.brbr-20 {
		border-bottom-right-radius: 20rpx;
	}

	.br-200 {
		border-radius: 200rpx;
	}

	.br-40 {
		border-radius: 40rpx;
	}

	.br-30 {
		border-radius: 30rpx;
	}

	.br-20 {
		border-radius: 20rpx;
	}

	.br-10 {
		border-radius: 10rpx;
	}

	.col-f {
		color: #fff !important;
	}

	.col-0 {
		color: #000;
	}

	.col-54 {
		color: #303030;
	}

	.col-87 {
		color: #878787;
	}

	.col-b1 {
		color: #b1bbb1;
	}

	.col-00ba31 {
		color: #14cc60 !important;
	}

	.col-0a2e36 {
		color: #0a2e36;
	}

	.col-0a2e365e {
		color: #0a2e365e;
	}

	.col-0a2e360a {
		color: #0a2e360a;
	}

	.col-27fb6b {
		color: #27fb6b;
	}

	.bac-col-00b {
		background: #14cc60 !important;
	}

	.bac-col-0a20a {
		background: #0a2e360a !important;
	}

	.bac-col-ffd {
		background: #f5c944 !important;
	}

	.bac-col-68 {
		background: #14cc6026;
	}

	.bac-col-ff0 {
		background-color: #fd3613f2;
	}

	.bac-col-4e {
		background: #46ccea;
	}

	.bac-col-f {
		background: #fff !important;
	}

	.bac-col-fa {
		background: #f7f7f7;
	}

	.bac-col-05 {
		background: #00000005;
	}

	/* 竖线 */
	.shu {
		width: 6rpx;
		height: 30rpx;
		border-radius: 200rpx;
		background: #f7f8fa;
	}

	/* 横线 */
	.heng {
		width: 100%;
		height: 20rpx;
		background: #f7f8fa;
	}

	.fs-56 {
		font-size: 56rpx;
	}

	.fs-50 {
		font-size: 50rpx;
	}

	.fs-48 {
		font-size: 48rpx;
	}

	.fs-46 {
		font-size: 46rpx;
	}

	.fs-44 {
		font-size: 44rpx;
	}

	.fs-42 {
		font-size: 42rpx;
	}

	.fs-40 {
		font-size: 40rpx;
	}

	.fs-38 {
		font-size: 38rpx;
	}

	.fs-36 {
		font-size: 36rpx;
	}

	.fs-34 {
		font-size: 34rpx;
	}

	.fs-32 {
		font-size: 32rpx;
	}

	.fs-15x {
		font-size: 15px;
	}

	.fs-31 {
		font-size: 31rpx;
	}

	.fs-30 {
		font-size: 30rpx;
	}

	.fs-28 {
		font-size: 28rpx;
	}

	.fs-26 {
		font-size: 26rpx
	}

	.fs-24 {
		font-size: 24rpx
	}

	.fs-22 {
		font-size: 22rpx
	}

	.fs-20 {
		font-size: 20rpx
	}

	.fw-900 {
		font-weight: 900;
	}

	.fw-600 {
		font-weight: 600;
	}

	/* 强制文字不换行 */
	.whi-sp {
		white-space: nowrap;
	}

	/* 强制换行 */
	.fwrap-wr {
		display: flex;
		flex-wrap: wrap;
	}

	// 防挤压
	.flex-shrink-0 {
		flex-shrink: 0;
	}

	::-webkit-scrollbar {
		display: none;
	}

	.dh-0-4s {
		-webkit-animation-duration: 0.4s;
		animation-duration: 0.4s;
	}

	.dh-0-6s {
		-webkit-animation-duration: 0.6s;
		animation-duration: 0.6s;
	}

	.dh-1s {
		-webkit-animation-duration: 1s;
		animation-duration: 1s;
	}

	//按钮背景
	.btn-bg {
		background: #0a2e36;
		width: 150rpx;
		height: 60rpx;
		line-height: 60rpx;
		transition: transform 0.2s ease, box-shadow 0.2s ease;
	}


	.btn-bg:active {
		transform: scale(0.9);
		/* 点击时按钮缩小 */
		box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
		/* 点击时添加阴影 */
	}


	//按钮文字样式
	.gradient-text {
		background-image: linear-gradient(to right, #27fb6b, #27fb6b);
		font-weight: bold;
		/* 让背景应用到文字 */
		-webkit-background-clip: text;
		color: transparent;
		/* 让文字本身透明，这样才显示渐变 */
	}

	// 上边框
	.bor-top-f3 {
		border-top: 1rpx solid #f3f3f3;
	}

	// 下边框
	.bor-bottom-f3 {
		border-bottom: 1rpx solid #f3f3f3;
	}

	// 适配底部横条
	.bottom-h {
		padding-bottom: 30rpx !important;
		padding-bottom: calc(20rpx + constant(safe-area-inset-bottom)) !important;
		padding-bottom: calc(20rpx + env(safe-area-inset-bottom)) !important;
	}

	.bottom-index {
		padding-bottom: 30rpx !important;
		padding-bottom: calc(109rpx + constant(safe-area-inset-bottom)) !important;
		padding-bottom: calc(109rpx + env(safe-area-inset-bottom)) !important;
	}

	//模糊背景
	.vague-bg-9 {
		background: rgba(255, 255, 255, 0.9);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(10px);
	}

	.vague-bg-8 {
		background: rgba(255, 255, 255, 0.8);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(10px);
	}

	.vague-bgfa-8 {
		background: rgba(250, 250, 250, 0.8);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(10px);
	}

	.vague-bg-5 {
		background: rgba(255, 255, 255, 0.5);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(10px);
		/* 背景模糊效果 */
	}

	.vague-bg-0 {
		background: rgba(255, 255, 255, 0);
	}

	.border-f0 {
		border: 1rpx solid #f0f0f0;
	}

	.border-bf {
		border: 1rpx solid #bfbfbf;
	}

	.border-003a {
		border: 1rpx solid #14cc60;
	}

	//拟物
	.box-nw {
		box-shadow: 8rpx 8rpx 16rpx rgba(0, 0, 0, 0.15), -8rpx -8rpx 16rpx rgba(255, 255, 255, 0.7);
	}

	.overflow-h {
		overflow: hidden;
	}

	// 加载中蒙版
	.mask-load {
		width: 100%;
		height: 100vh;
		position: fixed;
		top: 0;
		z-index: 9999;
		background: #ffffff73;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	// 文字边框
	.text-border {
		text-shadow:
			-2px -2px 2px white,
			2px -2px 2px white,
			-2px 2px 2px white,
			2px 2px 2px white;
	}

	// 活动列表为空
	.activity-empty-box {
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -80%);
		text-align: center;
	}

	.activity-empty-image {
		width: 200rpx;
		height: 200rpx;
	}

	// 底部logo样式
	.bot-logo {
		width: 75rpx;
		height: 75rpx;
		border-radius: 200rpx;
	}

	.bot-name {
		width: 96rpx;
		height: 40rpx;
	}
</style>